Class sjl.Bind1stFunction
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sjl.Bind1stFunction

java.lang.Object
   |
   +----sjl.Bind1stFunction

public class Bind1stFunction
extends Object
implements Function1
A function adapter. The Bind1stFunction class can wrap a Function2 class so that it appears as a Function1.
    Algo.transform(list.begin(), list.end(), list.begin()
              new Bind1stFunction(new FuncSumInteger(), new Integer(5)));
The above example will add 5 to each integer in list.

Copyright © 1996 Finn Bock


Constructor Index

 o Bind1stFunction(Function2, Object)
Specified the function and the value to use.

Method Index

 o perform(Object)
Call the specified function using value and the argument.

Constructors

 o Bind1stFunction
  public Bind1stFunction(Function2 func,
                         Object val)
Specified the function and the value to use.

Methods

 o perform
  public Object perform(Object o)
Call the specified function using value and the argument.

All Packages  Class Hierarchy  This Package  Previous  Next  Index